import sympy as sp

# 定义符号变量
x = sp.symbols('x')

# 定义被积函数
f_x = 1 / (1 + x)

# 计算定积分
result = sp.integrate(f_x, (x, 0, 1))
print("极限结果:", result)